package compile;

/**
 * @author SongJun
 * @description TODO:
 * @date 2021/9/28 14:22
 */
public class Token {
    TokenKindEnum kind;
    String text;

    public Token(TokenKindEnum kind, String text) {
        this.kind = kind;
        this.text = text;
    }

    public TokenKindEnum getKind() {
        return kind;
    }

    public void setKind(TokenKindEnum kind) {
        this.kind = kind;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("Token{");
        sb.append("kind=").append(kind);
        sb.append(", text='").append(text).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
